// Components/specialSale/specialSale.js
Component({
    created:function(){
        this.getspecial()
        // console.log(Date.now())
        setInterval(()=>{
            this.setData({
                now:Date.now()
            })
        },1000)
    },
    /**
     * 组件的属性列表
     */
    properties: {

    },

    /**
     * 组件的初始数据
     */
    data: {
        indicatorDots: true,
        vertical: true,
        autoplay: true,
        interval: 3000,
        banner: [],
        duration:1000,
        brandList:[],
        report:[],
        now:''
    },

    /**
     * 组件的方法列表
     */
    methods: {
       getspecial(){
           var that =this;
        wx.request({
            url: 'http://cmsjapi.ffquan.cn/api/category/product/model-detail-by-model-id-new', //仅为示例，并非真实的接口地址
            data: {
                entityId: 4,
                modelId: 20936,
                proModelId: 21,
                source: 3,
                version: 'v1',
                tuserId: 1317749,
                isWechat: 0
            },
            header: {
              'content-type': 'application/json' // 默认值
            },
            success (res) {
                // console.log(res.data.data)
              that.setData({
                brandList:res.data.data.brandDTOS,
                report:res.data.data.reports.splice(0,5)
              })

            }
          })
       }
    }
})
